import React,{useState} from 'react'

const useNum = () => {
  const [num,setNum] = useState(0)

  const addNum = () =>{
    setNum(num+1)
  }
  const cutNum = () =>{
    setNum(num-1)
  }

  return {num,addNum,cutNum}
  
}

export default useNum